package com.com.corejavalearnings.generics.designpattern.strategy;

/**
 * Created by pankaj on 7/26/15.
 */
public abstract class TaxPayer
{
    private long income;
    protected TaxPayer(long income)
    {
        this.income = income;
    }
    public long getIncome()
    {
        return income;
    }
}
class Person extends TaxPayer
{
    Person(long income)
    {
        super(income);
    }
}

class Trust extends TaxPayer
{
    private boolean isNonProfit = false;
    Trust(long income, boolean isNonProfit)
    {
      super(income);
      this.isNonProfit = isNonProfit;
    }

    public boolean isNonProfit()
    {
        return isNonProfit;
    }
}
